package cn.chinaflame.pagodas.entity;

import java.util.Objects;
import javax.persistence.*;
/**
 * @author created by lbq
 * @date 2018年1月4日 下午2:31:09
 **/
@Entity
@Table(name = "pa_email_log", schema = "pagoda", catalog = "")
public class PaEmailLog {
    private String id;
    private String receiver;//收件人
    private String subject;//邮件主题
    private String content;//邮件内容
    private String copyto;//抄送人
    private String createtime;//创建时间
    private String result;//发送结果 
    private String attachFile;//附件文件路径
    public PaEmailLog() {}
    public PaEmailLog(String receiver,String subject,String content,String copyto,String result,String attachFile) {
    	this.receiver= receiver;
    	this.subject = subject;
    	this.content = content;
    	this.copyto = copyto;
    	this.result = result;
    	this.attachFile = attachFile;
    }
    @Id
    @Column(name = "id", nullable = false, length = 20)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "receiver", nullable = true, length = 200)
    public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}
    @Basic
    @Column(name = "subject", nullable = true, length = 200)
	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}
    @Basic
    @Column(name = "content", nullable = true, length = 200)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
    @Basic
    @Column(name = "copyto", nullable = true, length = 200)
	public String getCopyto() {
		return copyto;
	}

	public void setCopyto(String copyto) {
		this.copyto = copyto;
	}
    @Basic
    @Column(name = "createtime", nullable = true, length = 200)
	public String getCreatetime() {
		return createtime;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
    @Basic
    @Column(name = "result", nullable = true, length = 200)
	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}
	@Basic
    @Column(name = "attach_file", nullable = true, length = 200)
	public String getAttachFile() {
		return attachFile;
	}
	public void setAttachFile(String attachFile) {
		this.attachFile = attachFile;
	}
	@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PaEmailLog that = (PaEmailLog) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(receiver, that.receiver) &&
                Objects.equals(createtime, that.createtime) &&
                Objects.equals(subject, that.subject)&&
                Objects.equals(content, that.content)&&
                Objects.equals(copyto, that.copyto)&&
                Objects.equals(attachFile, that.attachFile)&&
                Objects.equals(result, that.result);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, receiver, subject,content,createtime, copyto,attachFile,result);
    }
}
